/**
 * @author：anlzou
 * @Date：Created in21:28 2021/3/28
 * @Github：https://github.com/anlzou
 * @Description：
 */
package com.anlzou.demo.classTest.stream;

import java.util.*;

public class SquareElementOfList {
    List<Integer> list = new ArrayList<Integer>();

    public void setList(int[] num){
        int i = 0;
        while (i < num.length){
            list.add(num[i]);
            i++;
        }
    }

    public void printElementSquare(){
        Iterator iterator = list.iterator();
        while (iterator.hasNext()){
            System.out.println(iterator.next());
        }
    }
}
